/**
 * NewsConfigServiceImpl.java
 * @author
 * 作者 屈甲康 
 */
package org.jackysoft.service.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jackysoft.entity.NewsConfig;
import org.jackysoft.service.AbstractStringIdServiceImpl;
import org.jackysoft.service.NewsConfigService;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class NewsConfigServiceImpl extends AbstractStringIdServiceImpl<NewsConfig>
implements NewsConfigService {
    /**
	 * 
	 */
	private static final long serialVersionUID = 7151002366201928938L;
	final static Log logger = LogFactory.getLog(NewsConfigServiceImpl.class);

	public NewsConfigServiceImpl(){
	    super(NewsConfig.class);
	}
	
	

	@Override
	public void create(NewsConfig b) throws DataAccessException {
		String hql=String.format("delete from %s  where cataSid='%s'",table(),b.getCataSid());
		int rows = query(hql).executeUpdate();
   
		super.create(b);
	}
	
	
		
}